<%@ include file="/common/taglibs.jsp"%>

<title><fmt:message key="lottery649List.title"/></title>
<content tag="heading"><fmt:message key="lottery638List.heading"/></content>
<meta name="menu" content="Lottery638Menu"/>

<table border="1" width="85%" align=center>

<%
	int occurNoMax = Integer.parseInt((String)session.getAttribute("max"));
	int occurNoMin = Integer.parseInt((String)session.getAttribute("min"));
	int[] lotto = (int[])session.getAttribute("lottery");
	int[] lotto2 = (int[])session.getAttribute("lottery2");
	for(int l=occurNoMax+1;l>=occurNoMin;l--)
	{
	%><tr><td align="center"> <fmt:message key="count649Form.occur"/> <%= l %> <fmt:message key="count649Form.times"/></td>
	
	<%
		for(int i=1;i<39;i++)
		{
			if(lotto[i]==l)
			{ 
				%><td align="center"><%= i %></td>
<% 			}
 		}
 		
%> </tr> 
	<tr></tr>

<%
	}	
	int max=0;
	for(int i=1;i<lotto2.length;i++)
	{
	   //out.println(lotto2[i]);
	   max=Math.max(max, lotto2[i]);
  }
  //out.println(lotto2.length);
  //out.println("max:"+max);
  
	for(int i=max+1;i>=0;i--)
	{%><tr><td align="center"> <fmt:message key="count649Form.occur"/> <%= i %> <fmt:message key="count649Form.times"/></td>
	
	<%		
	for(int j=1;j<=8;j++)
	{
	  //out.print(lotto2[j]==i);
		if(lotto2[j]==i)
		{ 
			%><td align="center"><%= j %></td>
<% 		}
	}
		
%> </tr> <%
		
	}

%>
</table>

<script type="text/javascript">
    highlightTableRows("lottery638List");
</script>
